<%@ page language="java" import="pos.domain.*,java.util.*" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>IntercambiosRecibidos</title>
<style type="text/css">
body {
	background-color:#4F4F4F
	
	
	
}
div {
	background-color:#CD5A24;
	margin-right:300px;
	margin-left: 200px;
	color: #333;
}
</style>
</head>
<body>
<img src= "http://www.thepropertyexchange.com.au/images/prop-header.png" /> 
<%
IExchangeManager em= new ExchangeManager();
String eid=request.getParameter("eid");
Exchange e= em.dameUno(eid);
String user=(String)session.getAttribute("session.user");

String userRat=e.getEmailSent();
String property=e.getPropertySentID();
if(e.getEmailSent().equals(user)){
	userRat=e.getEmailReceived();
	property=e.getPropertyReceivedID();
}


%>
<form action="FrontController?res=confirmavaloracion.jsp?eid=<%=eid %>" method="post">
<h6>VALORA LA CASA:</h6>
<fieldset>
<table>
		<tr>
			<td> codigo intercambio</td>
			<td><%= e.getExchangeID()%></td>
		</tr>
		<tr>
			<td> Casa a valorar</td>
			<td><%= property%></td>
		</tr>
		
		<tr>
			<td><br></br><b>Valoraciones de 1 a 10 :</b></td>
		</tr>
		<tr>
			 <td><br></br>	Situacion de la casa:		 </td>
			 <td><input type="text" name="geoLocation" value="6"/> </td>
		</tr>
		<tr>
			 <td>	Limpieza de la casa:		 </td>
			 <td><input type="text" name="cleaning" value="8"/> </td>
		</tr>
		<tr>
			 <td>	Acorde con lo acordado:		 </td>
			 <td><input type="text" name="contracted" value="8"/> </td>
		</tr>
		<tr>
			 <td>	Comentario:		 </td>
			 <td><textarea name="comments" rows= 5 cols=40 ></textarea> </td>
		</tr>
		
</table>

</fieldset>
<h6>VALORA AL USUARIO:</h6>

<fieldset>
<table>
		<tr>
			<td> usuario</td>
			<td><%= userRat%></td>
		</tr>
		<tr>
			<td><br></br><b>Valoraciones de 1 a 10 :</b></td>
		</tr>
		<tr>
			 <td><br></br>	Valora al usuario:		 </td>
			 <td><input type="text" name="calification" value="8"/> </td>
		</tr>
		<tr>
			 <td>	Comentario:		 </td>
			 <td><textarea name="commentsUser" rows= 5 cols=40 ></textarea></td>
		</tr>
</table>


</fieldset>

<input type="submit" value="Valorar"/>
</form>
</body>
</html>